window.onload = function () {
    var lis = document.querySelectorAll('#banner li')
    var index = 0
    setInterval(autoMove, 3000)
    function autoMove() {
        for (var i = 0; i < lis.length; i++) {
            lis[i].className = ''
        }
        index++
        if (index == lis.length) {
            index = 0
        }
        console.log(index)
        lis[index].className = 'active'
        if (index == lis.length - 1) {
            index = -1
        }
    }
}